#ifndef GTESTQT_H
#define GTESTQT_H

#include <ostream>
#include <QString>
#include <QUrl>
#include "components/threadid.h"
#include "components/postid.h"

std::ostream& operator<<(std::ostream &out, const QString& str)
{
	out << qPrintable(str);
	return out;
}

std::ostream& operator<<(std::ostream &out, const QUrl& url)
{
	out << "QUrl(" << qPrintable(url.toString()) << ")";
	return out;
}

std::ostream& operator<<(std::ostream &out, const Wishmaster::ThreadId& id)
{
	if(!id.isValid())
	{
		out << "ThreadId()";
		return out;
	}
	out << "ThreadId(\"" << qPrintable(id.chanName()) << "\", \"" << qPrintable(id.boardId()) <<
			"\", \"" << qPrintable(id.threadStringId()) << "\")";
	return out;
}

std::ostream& operator<<(std::ostream &out, const Wishmaster::PostId& id)
{
	if(!id.isValid())
	{
		out << "PostId()";
		return out;
	}
	out << "PostId(" << id.getThreadId() << ", \"" << id.postId() << "\")";
	return out;
}

#endif // GTESTQT_H
